package Main;

import java.awt.CardLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;


public class MainFrame {
	
	public MainFrame(){
	
		JFrame frame = new JFrame();
		JPanel cards;
		CardLayout cl;
		cards=new JPanel(cl=new CardLayout());

		FileReader fr = new FileReader();
		 
		MainPane panel = new MainPane(cards, cl);
		TablePane panel2 =  new TablePane(cards, cl, fr);
		SimulationPane panel3 = new SimulationPane(cards, cl, fr);
		
		cards.add(panel, "1");
		cards.add(panel2, "2");
		cards.add(panel3, "3");
		
		frame.add(cards);
		//frame.setFocusable(true);
		frame.setSize(panel.getPreferredSize());
		frame.setVisible(true);
		frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
		frame.setLocationRelativeTo(null);	
		
	}
	
	public static void main(String[] args){
		try{
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		}
		catch(Exception ex){}
		
		new MainFrame();
	}
}
